using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Reflection;
using System.Text;
using System.Windows.Forms;

namespace Wax.Runner
{
    public partial class AboutWaxRunner : Form
    {
        public AboutWaxRunner()
        {
            InitializeComponent();
            InitializeFields();
        }

        private void InitializeFields()
        {
            InitializeVersion();
        }

        /// <summary>
        /// Initializes the version label.
        /// </summary>
        private void InitializeVersion()
        {
            this.VersionLabel.Text = Assembly.GetExecutingAssembly().GetName().Version.ToString();
        }

        /// <summary>
        /// Handles the Click event of the OKButton control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void OKButtonClick(object sender, EventArgs e)
        {
            this.Close();
        }

        /// <summary>
        /// Handles the Clicked event of the Link control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Windows.Forms.LinkLabelLinkClickedEventArgs"/> instance containing the event data.</param>
        private void LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            LinkLabel linkLabel = sender as LinkLabel;

            if (linkLabel != null)
            {
                Process.Start(linkLabel.Text);
            }
        }
    }
}